import time, functools
def metric(fn):
    def measure_time(*a, **b):
      start_time=time.time()
      result=fn(*a, **b)
      end_time=time.time()
      print('%s executed in %s ms' % (fn.__name__, end_time-start_time))
      return result
    return measure_time

@metric
def fast(a, b):
    time.sleep(0.0125)
    return a + b;

@metric
def slow(a, b, c):
    time.sleep(0.1524)
    return a * b *c;

f = fast(11, 22)
s = slow(11, 22, 33)
if f != 33:
    print('失败!')
elif s != 7986:
    print('失败!')